**********************************************************************************************
**Appendices
**********************************************************************************************

**use "/Users/user/Downloads/POLCOMM City Council Data Processed Final.dta"

**APPENDIX D
*Table D1
pwcorr distractgen_dum talk_dum write_dum leaveseat_dum if (race_rep_white==1 | race_rep_black==2) & (race_const_white==1| race_const_black==1), listwise

**APPENDIX F, Descriptive Statistics 

*Table F1 Full Sample Column (All Racial/Ethnic Groups on left hand side)
mixed new30sec i.race_const##i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - First 30 Seconds 
sum new30sec if e(sample) 

mixed new1minute i.race_const##i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - First 60 Seconds 
sum new1minute if e(sample) 

mixed new2minutes i.race_const##i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - 61-120 Seconds
sum new2minutes if e(sample) 

mixed new3minutes i.race_const##i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - 121-180 Seconds
sum new3minutes if e(sample) 

mixed total_perc2 i.race_const##i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*rows - Proportion and Independent/Control Variables
sum total_perc2 i.race_const i.race_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class i.order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting if e(sample)

*Table F1 Black-White Sample Columns on Right Hand Side (White Member & Black Member)
mixed new30sec i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - First 30 Seconds 
sum new30sec if e(sample) & black_white_rep==0
sum new30sec if e(sample) & black_white_rep==1

mixed new1minute i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - First 60 Seconds 
sum new1minute if e(sample) & black_white_rep==0
sum new1minute if e(sample) & black_white_rep==1

mixed new2minutes i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - 61-120 Seconds
sum new2minutes if e(sample) & black_white_rep==0
sum new2minutes if e(sample) & black_white_rep==1

mixed new3minutes i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*row - 121-180 Seconds
sum new3minutes if e(sample) & black_white_rep==0
sum new3minutes if e(sample) & black_white_rep==1

mixed total_perc2 i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:
*Black member column; rows - Proportion and Independent/Control Variables
sum total_perc2 i.black_white_const i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class i.order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting if e(sample) & black_white_rep==0
*White member column; rows - Proportion and Independent/Control Variables
sum total_perc2 i.black_white_const i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class i.order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting if e(sample) & black_white_rep==1

***APPENDIX H Alternative Model Specification
*see "POLCOMM Appendix H Alternative Models DoFile"

***APPENDIX I Regression Models for Table 2 
**see output for mixed effects linear models from "POLCOMM Processed Data Main Analysis DoFile" 

**APPENDIX J Additional Analyses
mixed total_perc2 i.race_const##i.white_nonwhite_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J1, Proportion Columns 
margins white_nonwhite_rep##race_const
margins r.race_const@white_nonwhite_rep
margins r.white_nonwhite_rep@race_const

mixed new30sec i.race_const##i.white_nonwhite_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J1, First 30 Seconds Columns
margins white_nonwhite_rep##race_const
margins r.race_const@white_nonwhite_rep
margins r.white_nonwhite_rep@race_const

mixed new1minute i.race_const##i.white_nonwhite_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J1, First Minute Columns
margins white_nonwhite_rep##race_const
margins r.race_const@white_nonwhite_rep
margins r.white_nonwhite_rep@race_const

mixed new2minutes i.race_const##i.white_nonwhite_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J1, 61-120 Seconds Columns
margins white_nonwhite_rep##race_const
margins r.race_const@white_nonwhite_rep
margins r.white_nonwhite_rep@race_const

mixed new3minutes i.race_const##i.white_nonwhite_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J1, 121-180 Columns
margins white_nonwhite_rep##race_const
margins r.race_const@white_nonwhite_rep
margins r.white_nonwhite_rep@race_const

*Table J2 

mixed atleast60 i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J2, 0-60 Seconds Column 
margins black_white_rep##black_white_const
margins r.black_white_const@black_white_rep
margins r.black_white_rep@black_white_const

mixed atleast120 i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J2, 0-120 Seconds Column 
margins black_white_rep##black_white_const
margins r.black_white_const@black_white_rep
margins r.black_white_rep@black_white_const

mixed atleast180 i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table J2, 0-180 Seconds Column 
margins black_white_rep##black_white_const
margins r.black_white_const@black_white_rep
margins r.black_white_rep@black_white_const

**APPENDIX K T-tests

*Table K1
*Black Member Column
ttest total_perc2 if black_white_rep==0, by(black_white_const) unequal
*White Member Column
ttest total_perc2 if black_white_rep==1, by(black_white_const) unequal
*Black Constituent Row
ttest total_perc2 if black_white_const==0, by(black_white_rep) unequal
*White Constituent Row
ttest total_perc2 if black_white_const==1, by(black_white_rep) unequal

*Table K2
*Black Member Column
ttest new30sec if black_white_rep==0, by(black_white_const) unequal
*White Member Column
ttest new30sec if black_white_rep==1, by(black_white_const) unequal
*Black Constituent Row
ttest new30sec if black_white_const==0, by(black_white_rep) unequal
*White Constituent Row
ttest new30sec if black_white_const==1, by(black_white_rep) unequal

*Table K3
*Black Member Column
ttest new1minute if black_white_rep==0, by(black_white_const) unequal
*White Member Column
ttest new1minute if black_white_rep==1, by(black_white_const) unequal
*Black Constituent Row
ttest new1minute if black_white_const==0, by(black_white_rep) unequal
*White Constituent Row
ttest new1minute if black_white_const==1, by(black_white_rep) unequal

*Table K4
*Black Member Column
ttest new2minutes if black_white_rep==0, by(black_white_const) unequal
*White Member Column
ttest new2minutes if black_white_rep==1, by(black_white_const) unequal
*Black Constituent Row
ttest new2minutes if black_white_const==0, by(black_white_rep) unequal
*White Constituent Row
ttest new2minutes if black_white_const==1, by(black_white_rep) unequal

*Table K5
*Black Member Column
ttest new3minutes if black_white_rep==0, by(black_white_const) unequal
*White Member Column
ttest new3minutes if black_white_rep==1, by(black_white_const) unequal
*Black Constituent Row
ttest new3minutes if black_white_const==0, by(black_white_rep) unequal
*White Constituent Row
ttest new3minutes if black_white_const==1, by(black_white_rep) unequal


***APPENDIX L
**Proportion of Time spent Talking as Dependent Variable 
mixed talk_perc i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table L1, Model 1 Talk, Row 1-4
margins black_white_rep##black_white_const
*Table L1, Model 1 Talk, Row 5-6
margins r.black_white_const@black_white_rep
*Table L1, Model 1 Talk, Row 7-8
margins r.black_white_rep@black_white_const


**Proportion of Time spent Writing as Dependent Variable 
mixed write_perc i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table L1, Model 2 Write, Row 1-4
margins black_white_rep##black_white_const
*Table L1, Model 2 Write, Row 5-6
margins r.black_white_const@black_white_rep
*Table L1 Model 2 Write, Row 7-8
margins r.black_white_rep@black_white_const

**Proportion of Time spent Out of Seat as Dependent Variable 
mixed leaveseat_perc i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table L1, Model 3 Out of Seat, Row 1-4
margins black_white_rep##black_white_const
*Table L1, Model 3 Out of Seat, Row 5-6
margins r.black_white_const@black_white_rep
*Table L1, Model 3 Out of Seat, Row 7-8
margins r.black_white_rep@black_white_const

**Proportion of Time spent on General Activities as Dependent Variable 
mixed distractgen_perc i.black_white_const##i.black_white_rep i.gender_rep i.gender_const i.freq_const i.domin_topic i.same_opinion i.content_race i.content_class order2 i.ward_rep i.city i.cat_sptotal1 i.conf_meeting || _all: R.rep || const1:

*Table L1, Model 4 General, Row 1-4
margins black_white_rep##black_white_const
*Table L1, Model 4 General, Row 5-6
margins r.black_white_const@black_white_rep
*Table L1, Model 4 General, Row 7-8
margins r.black_white_rep@black_white_const

